package com.yj.cmp.sdk.fusioncompute.network.portgroup;

import com.yj.cmp.sdk.fusioncompute.network.portgroup.dto.PortGroupDto;
import com.yj.cmp.sdk.fusioncompute.network.portgroup.vo.PortGroupVo;
import com.yj.cmp.sdk.fusioncompute.network.portgroup.vo.PortGroupsListVo;
import okhttp3.ResponseBody;
import org.springframework.stereotype.Service;
import retrofit2.Call;
import retrofit2.http.*;

import java.util.Map;

/**
 * @author Harvey_Yang
 * @date 2021/8/30 17:58
 */
@Service
public interface FcPortGroupService {

    @GET("portgroups")
    Call<PortGroupsListVo> portGroupsList(@HeaderMap Map<String, Object> headers, @HeaderMap Map<String, Object> queryParam);

    @POST("portgroups")
    Call<PortGroupVo> createPortGroup(@HeaderMap Map<String, Object> headerMap, @Body PortGroupDto portGroupDto);

    @DELETE("portgroups/{portGroupId}")
    Call<ResponseBody> deletePortGroup(@HeaderMap Map<String, Object> headers, @Path("portGroupId") String portGroupId);

    @PUT("portgroups/{portGroupId}")
    Call<PortGroupVo> updatePortGroup(@HeaderMap Map<String, Object> headers, @Path("portGroupId") String portGroupId,
                                      @Body PortGroupDto portGroupDto);
}
